

DEFINE VARIABLE Hold LIKE mfc_logical .

DEFINE VARIABLE days AS INTEGER .

DEFINE VARIABLE num AS INTEGER.

days = 180.

num = 0.


FOR EACH pt_mstr WHERE pt_status = "AC" :
    
    Hold = YES.

    FOR EACH IN_mstr NO-LOCK WHERE IN_part = pt_part AND
        ( ( in_iss_date <> ? AND (TODAY - IN_iss_date) <= days ) OR  ( IN_rec_date <> ? OR (TODAY - IN_rec_date) <= days ) ) :

        hold = NO.
        LEAVE.

    END.


    IF Hold = YES THEN DO:
        DISPLAY pt_part pt_status .
    END.



    IF Hold = YES THEN
        pt_status = "UP" .


END.


